home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Columbia Kermit
/
kermit.zip
/
newsgroups
/
misc.20010306-20010921
/
000058_news@columbia.edu _Thu Apr 5 15:12:52 2001.msg
< prev
next >
Wrap
Internet Message Format
|
2020-01-01
|
2KB
Return-Path: <news@columbia.edu>
Received: from newsmaster.cc.columbia.edu (newsmaster.cc.columbia.edu [128.59.59.30])
by fozimane.cc.columbia.edu (8.9.3/8.9.3) with ESMTP id PAA11492
for <kermit.misc@cpunix.cc.columbia.edu>; Thu, 5 Apr 2001 15:12:50 -0400 (EDT)
Received: (from news@localhost)
by newsmaster.cc.columbia.edu (8.9.3/8.9.3) id PAA29678
for kermit.misc@watsun.cc.columbia.edu; Thu, 5 Apr 2001 15:07:39 -0400 (EDT)
X-Authentication-Warning: newsmaster.cc.columbia.edu: news set sender to <news> using -f
From: grante@visi.com (Grant Edwards)
Subject: Re: Macro prameters containing spaces?
Message-ID: <Yn3z6.11074$SB2.1263103@ruti.visi.com>
Date: Thu, 05 Apr 2001 19:07:36 GMT
To: kermit.misc@columbia.edu
In article <9aif5j$sbs$1@newsmaster.cc.columbia.edu>, Frank da Cruz wrote:
>: I'm trying to automate some stuff done via serial port using
>: CKermit 7. My local B&N didn't carry the book, so I've ordered
>: a copy. But, in the meanwhile, I'm stuck on trying to write a
>: macro where one of the parameters is a string that may have
>: spaces in it:
>:
>: define docmd {
>: output \fcontents(\%2)
>: output \13
>: input \%1 Prompt>
>: if failure echo FAILURE
>: }
>:
>: define setup {
>: docmd 1 hello
>: docmd 1 "ip 192.168.1.11 255.255.255.0 192.168.1.1"
That apparently needs to be:
docmd 1 {ip 192.168.1.11 255.255.255.0 192.168.1.1}
The double-quotes are apparently passed as normal text, so with
the previous version the second parameter is "ip, the third is
192.168.1.11, etc.
>There's nothing wrong with your script as far as argument
>passing is concerned, as you can verify for youself with TRACE
>/ON or by putting SHOW ARGS as the first command in DOCMD. I
>ran your SETUP macro myself, supplying a "Prompt>" string four
>times, and it worked fine.
It worked fine once I used curly-braces instead of
double-quotes to quote the parameter string. As usual: pull
your hair out for hours with no results. Post the question to
Usenet, and you figure it out minutes later.
--
Grant Edwards grante Yow! I have a very good
at DENTAL PLAN. Thank you.
visi.com